# house/detail_page.py
from flask import Blueprint, render_template
from house.models import House

detail_page = Blueprint('detail_page', __name__)

@detail_page.route('/house/<int:house_id>')
def house_detail(house_id):
    house = House.query.get(house_id)
    if house is None:
        return "房源不存在", 404
    return render_template('detail_page.html', house=house)